<?php 
session_start();
	ob_start();
require_once 'libararries/connect.php';
if(isset($_GET['mod'])){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Trang chủ</title>
<link href="public/css/style3.css" rel = "stylesheet" type = "text/css"/>
<script type="text/javascript" src="public/ckeditor/ckeditor.js"></script>
</head>
<body>
	<div id="warper">
	<div id="containter_contain">
    	<div id="header">
    	<div id="banner"></div>
		<div id="than">
        	<div id="cottrai">
        <?php include 'views/admin/login/login.php';?>
        <?php include 'views/admin/menu.php';?>
            </div>
            <!-- The end menu -->
            </div>
            <!-- End Cột trái -->
            
            <div id="cotgiua"> 
<?php
	switch ($_GET['mod'])
	{
		//tac vu loai hang 
		case 'loaihang':
		case 'addloaihang':
		case 'delloaihang':
		case 'updateloaihang':{
			require_once 'controllers/admin/controllers_loaihang.php'; 
			break;
		}
	//tac vu chung loai hang 
		case 'chungloai':
		case 'addchungloaihang':
		case 'delchungloaihang':
		case 'updatechungloaihang':{
			require_once 'controllers/admin/controllers_chungloai.php'; 
			break;
		}
		// tac vu khach hang 
		case 'khachhang':
		case 'addkhachhang':
		case 'delkhachhang':
		case 'updatekhachhang':{
			require_once 'controllers/admin/controllers_khachhang.php';
			break;
		}
		// Tac vu ncc
		case 'ncc':
		case 'addncc':
		case 'delncc':
		case 'updatencc':{
			require_once 'controllers/admin/controllers_ncc.php';
			break;
		}
		//Tac vu tin tuc
		case 'tintuc':
		case 'addtintuc':
		case 'deltintuc':
		case 'updatetintuc':{
			require_once 'controllers/admin/controllers_tintuc.php';
			 break;
		}
		//tac vu user
		case 'user':
		case 'adduser':
		case 'deluser':
		case 'updateuser':{
			require_once 'controllers/admin/controllers_user.php'; 
			break;
		}
		//Tac vu mat hang
		case 'mathang':
		case 'addmathang':
		case 'delmathang':
		case 'updatemathang':{
			require_once 'controllers/admin/controllers_mathang.php'; 
			break;
		}
		//tac vu chi tiet nhap
		case 'ctnhap':
		case 'add_ctnhap':
		case 'del_ctnhap':
		case 'edit_ctnhap':{
			require_once 'controllers/admin/controllers_chitietnhap.php';
			 break;
		}
		//Tac vu hoa don 
		case 'hoadon':
		case 'del_hoadon':
		case 'edit_hoadon':
		case 'add_hoadon':{
			require_once 'controllers/admin/controllers_hoadon.php';
			break;
		}
		case 'edit_cthoadon':
		case 'del_cthoadon':
		case 'add_cthoadon':
		case 'cthoadon':{
			require_once 'controllers/admin/controllers_cthoadon.php';
			break;
		}
		case 'tk_hangton':
		case 'tk_khachhang':{
			require_once 'controllers/admin/controllers_thongke.php';
			break;
		}
		case 'timkhachhang':
		case 'timmathang':{require_once 'controllers/admin/controllers_timkiem.php'; break;}
		default:{echo 'Tác vụ đang cập nhật'; break;}
	}
	?>
	
          </div>
          <!-- End Cột giữa -->
          
        
        </div><!--END than-->
        
        <div id="footer"> 
        	<div align = "right"><p style="color:yellow; font-sixe: 14px;">Code By Mr.Cường and Mis.Ngọc </p> </div>
     </div><!--END footer-->
        </div>
    </div><!--END warper-->
</body>
</html>
	
<?php 
}else 
	if(!isset($_SESSION['dangnhap'])){
			require_once 'controllers/main/controllers_dangnhap.php';
		} 
	
?>
<?php ob_end_flush();?>